<h1>Listing reports</h1>

<%= pluralize(@reports.count, 'Report') %>
<p>
<table style="width=70%;">
  <tr>
    <th>Caption</th>
    <th>Description</th>
    <th>Email</th>
    <th>Date</th>
  </tr>

<% for report in @reports %>
  <tr>
    <td><%=h report.caption %></td>
    <td><%=h report.description %></td>
    <td><%=h report.email %></td>
    <td><%=h report.created_at.to_s(:short) %></td>
    <td><%= link_to 'Show', report %></td>
    <td><%= link_to 'Edit', edit_report_path(report) %></td>
    <td><%= link_to 'Destroy', report, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New report', new_report_path %>
